cp -r rust-nightly-$src-$target/lib/rustlib/$src-$target \
rust-nightly-$dst-$target/lib/rustlib
(cd rust-nightly-$dst-$target && \
- find lib/rustlib/$src-$target/lib -type f >> \
- lib/rustlib/manifest.in)
+ find lib/rustlib/$src-$target/lib -type f | sed 's/^/file:/' >> \
+ manifest-rustc.in)
./rust-nightly-$dst-$target/install.sh --prefix=rustc
rm -rf rust-nightly-$src-$target
version = "0.1.0"
dependencies = [
"curl 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "docopt 0.6.20 (registry+https://github.com/rust-lang/crates.io-index)",
+ "docopt 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)",
"flate2 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "git2 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "git2 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"glob 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"hamcrest 0.1.0 (git+https://github.com/carllerche/hamcrest-rust.git)",
"log 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libz-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "openssl-sys 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "openssl-sys 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "docopt"
-version = "0.6.20"
+version = "0.6.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "regex 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "git2"
-version = "0.1.4"
+version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libgit2-sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libssh2-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "openssl-sys 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "openssl-sys 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libz-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "openssl-sys 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "openssl-sys 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "regex 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "regex 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
[[package]]
name = "openssl-sys"
-version = "0.2.9"
+version = "0.2.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libressl-pnacl-sys 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
[[package]]
name = "regex"
-version = "0.1.4"
+version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
[[test]]
name = "tests"
+[[bench]]
+name = "tests"
+path = "tests/tests.rs"
[[test]]
name = "resolve"
#![feature(phase, macro_rules)]
-#![deny(warnings)]
extern crate "rustc-serialize" as rustc_serialize;
#[phase(plugin, link)] extern crate log;
let packages = self.package.as_ref().unwrap_or(&packages);
{
- let register_pkg = |pkg: &EncodableDependency| {
+ let register_pkg = |pkg: &EncodableDependency| -> CargoResult<()> {
let pkgid = try!(pkg.to_package_id(default));
let precise = pkgid.get_source_id().get_precise()
.map(|s| s.to_string());
}
{
- let add_dependencies = |pkg: &EncodableDependency| {
+ let add_dependencies = |pkg: &EncodableDependency| -> CargoResult<()> {
let package_id = try!(pkg.to_package_id(default));
let deps = match pkg.dependencies {
#![crate_type="rlib"]
#![feature(macro_rules, phase, default_type_params, unboxed_closures)]
+#![feature(slicing_syntax)]
#![deny(unused)]
#![cfg_attr(test, deny(warnings))]
//
// Note that this has to do some extra work just before running the command
// to determine extra environment variables and such.
- let work = move |: desc_tx: Sender<String>| {
+ let work = move |: desc_tx: Sender<String>| -> CargoResult<()> {
// Make sure that OUT_DIR exists.
//
// If we have an old build directory, then just move it into place,
// along to this custom build command.
let mut p = p;
{
- let build_state = build_state.outputs.lock();
+ let build_state = build_state.outputs.lock().unwrap();
for &(ref name, ref id) in lib_deps.iter() {
let data = &build_state[(id.clone(), kind)].metadata;
for &(ref key, ref value) in data.iter() {
fn insert(&self, id: PackageId, req: Platform,
output: BuildOutput) {
- let mut outputs = self.outputs.lock();
+ let mut outputs = self.outputs.lock().unwrap();
match req {
Platform::Target => { outputs.insert((id, Kind::Target), output); }
Platform::Plugin => { outputs.insert((id, Kind::Host), output); }
let out_dir = cx.layout(pkg, Kind::Target).build_out(pkg)
.display().to_string();
cx.compilation.extra_env.insert("OUT_DIR".to_string(), Some(out_dir));
- for (&(ref pkg, _), output) in cx.build_state.outputs.lock().iter() {
+ for (&(ref pkg, _), output) in cx.build_state.outputs.lock().unwrap().iter() {
let any_dylib = output.library_links.iter().any(|l| {
!l.ends_with(":static") && !l.ends_with(":framework")
});
let kind = match req { Platform::Plugin => Kind::Host, _ => Kind::Target };
let key = (pkg.get_package_id().clone(), kind);
if pkg.get_manifest().get_links().is_some() &&
- cx.build_state.outputs.lock().contains_key(&key) {
+ cx.build_state.outputs.lock().unwrap().contains_key(&key) {
continue
}
let (dirty, fresh, freshness) =
// Only at runtime have we discovered what the extra -L and -l
// arguments are for native libraries, so we process those here.
{
- let build_state = build_state.outputs.lock();
+ let build_state = build_state.outputs.lock().unwrap();
for id in native_lib_deps.into_iter() {
let output = &build_state[(id.clone(), kind)];
for path in output.library_paths.iter() {
use std::collections::HashMap;
use std::io::File;
use std::io::fs::PathExtensions;
+use std::iter::repeat;
use std::os;
-use term::color::BLACK;
use curl::http;
use git2;
use registry::{Registry, NewCrate, NewCrateDependency};
+use term::color::BLACK;
use core::source::Source;
use core::{Package, MultiShell, SourceId};
for (name, description) in list_items.into_iter() {
let line = match description {
Some(desc) => {
- let space = String::from_char(
- description_margin - name.len(),
- ' ');
+ let space = repeat(' ').take(description_margin - name.len())
+ .collect::<String>();
name.to_string() + space.as_slice() + desc.as_slice()
}
None => name
cred_helper.config(cfg);
let mut cred_error = false;
let ret = f(&mut |&mut: url, username, allowed| {
+ let username = if username.is_empty() {None} else {Some(username)};
let creds = if allowed.contains(git2::SSH_KEY) {
let user = username.map(|s| s.to_string())
.or_else(|| cred_helper.username.clone())
if me.is_empty() { return t.chars().count(); }
if t.is_empty() { return me.chars().count(); }
- let mut dcol = Vec::from_fn(t.len() + 1, |x| x);
+ let mut dcol = range(0, t.len() + 1).collect::<Vec<_>>();
let mut t_last = 0;
for (i, sc) in me.chars().enumerate() {
// Test bytelength agnosticity
for c in range(0u32, MAX as u32)
.filter_map(|i| from_u32(i))
- .map(|i| String::from_char(1, i)) {
+ .map(|i| i.to_string()) {
assert_eq!(lev_distance(c[], c[]), 0);
}